<!DOCTYPE html>
<html>
<head>
    <title>Binding to local data</title>
    <meta charset="utf-8">
    <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../styles/kendo.default.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet">
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/kendo.all.min.js"></script>
    <script src="../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    <div id="example">
    <div class="demo-section k-content">
        <div id="chart"></div>
    </div>
    <script>
        var sunPos = [
            {"time":"08:00","altitude":4.9,"azimuth":92.7},
            {"time":"09:00","altitude":17.6,"azimuth":100.6},
            {"time":"10:00","altitude":30.1,"azimuth":109.7},
            {"time":"11:00","altitude":41.8,"azimuth":121.3},
            {"time":"12:00","altitude":51.8,"azimuth":137.7},
            {"time":"13:00","altitude":58.5,"azimuth":161.5},
            {"time":"14:00","altitude":59.4,"azimuth":190.7},
            {"time":"15:00","altitude":54.1,"azimuth":216.6},
            {"time":"16:00","altitude":44.8,"azimuth":234.8},
            {"time":"17:00","altitude":33.5,"azimuth":247.6},
            {"time":"18:00","altitude":21.2,"azimuth":257.2},
            {"time":"19:00","altitude":8.4,"azimuth":265.3},
        ];

        function createChart() {
            $("#chart").kendoChart({
                title: {
                    text: "Sun position at equinox"
                },
                dataSource: {
                    data: sunPos
                },
                series: [{
                    type: "polarLine",
                    xField: "azimuth",
                    yField: "altitude",
                    labels: {
                        template: "#= dataItem.time.substring(0,2) #h",
                        position: "below",
                        visible: true
                    }
                }],
                xAxis: {
                    startAngle: -90,
                    majorUnit: 30
                },
                yAxis: {
                    labels: {
                        visible: false
                    }
                }
            });
        }

        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);
    </script>
</div>


    
    
</body>
</html>
